package com.rudolphliu.controller;

import com.rudolphliu.entity.TraceBaseNode;
import com.rudolphliu.entity.Users;
import com.rudolphliu.service.TraceBaseNodeService;
import com.rudolphliu.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IndexController {

    @Autowired
    private UsersService usersService;

    @Autowired
    private TraceBaseNodeService traceBaseNodeService;

    @RequestMapping("/index")
    public ModelAndView index()
    {
        ModelAndView modelAndView = new ModelAndView();
        TraceBaseNode user = traceBaseNodeService.traceBaseNodeList();
        modelAndView.addObject("myname",user);
        modelAndView.setViewName("index");
        return modelAndView;
    }
}
